home *** CD-ROM | disk | FTP | other *** search
/ SGI Freeware 1999 August / SGI Freeware 1999 August.iso / dist / fw_xemacs.idb / usr / freeware / lib / xemacs-20.4 / info / xemacs-faq.info-3.z / xemacs-faq.info-3
Encoding:
GNU Info File  |  1998-05-21  |  47.8 KB  |  1,406 lines

  1. This is Info file ../info/xemacs-faq.info, produced by Makeinfo version
  2. 1.68 from the input file xemacs-faq.texi.
  3.  
  4. 
  5. File: xemacs-faq.info,  Node: Q3.0.1,  Next: Q3.0.2,  Prev: Customization,  Up: Customization
  6.  
  7. What version of Emacs am I running?
  8. ===================================
  9.  
  10.    How can `.emacs' determine which of the family of Emacsen I am using?
  11.  
  12.    To determine if you are currently running GNU Emacs 18, GNU Emacs 19,
  13. XEmacs 19, XEmacs 20, or Epoch, and use appropriate code, check out the
  14. example given in `etc/sample.emacs'.  There are other nifty things in
  15. there as well!
  16.  
  17.    For all new code, all you really need to do is:
  18.  
  19.      (defvar running-xemacs (string-match "XEmacs\\|Lucid" emacs-version))
  20.  
  21. 
  22. File: xemacs-faq.info,  Node: Q3.0.2,  Next: Q3.0.3,  Prev: Q3.0.1,  Up: Customization
  23.  
  24. How can I evaluate Emacs-Lisp expressions?
  25. ==========================================
  26.  
  27.    I know I can evaluate Elisp expressions from `*scratch*' buffer with
  28. `C-j' after the expression.  How do I do it from another buffer?
  29.  
  30.    Press `M-:' (the default binding of `eval-expression'), and enter
  31. the expression to the minibuffer.  In XEmacs prior to 19.15
  32. `eval-expression' used to be a disabled command by default.  If this is
  33. the case, upgrade your XEmacs.
  34.  
  35. 
  36. File: xemacs-faq.info,  Node: Q3.0.3,  Next: Q3.0.4,  Prev: Q3.0.2,  Up: Customization
  37.  
  38. `(setq tab-width 6)' behaves oddly.
  39. ===================================
  40.  
  41.    If you put `(setq tab-width 6)' in your `.emacs' file it does not
  42. work!  Is there a reason for this?  If you do it at the EVAL prompt it
  43. works fine!! How strange.
  44.  
  45.    Use `setq-default' instead, since `tab-width' is all-buffer-local.
  46.  
  47. 
  48. File: xemacs-faq.info,  Node: Q3.0.4,  Next: Q3.0.5,  Prev: Q3.0.3,  Up: Customization
  49.  
  50. How can I add directories to the `load-path'?
  51. =============================================
  52.  
  53.    Here are two ways to do that, one that puts your directories at the
  54. front of the load-path, the other at the end:
  55.  
  56.      ;;; Add things at the beginning of the load-path, do not add
  57.      ;;; duplicate directories:
  58.      (pushnew "bar" load-path :test 'equal)
  59.      
  60.      (pushnew "foo" load-path :test 'equal)
  61.      
  62.      ;;; Add things at the end, unconditionally
  63.      (setq load-path (nconc load-path '("foo" "bar")))
  64.  
  65.    keith (k.p.) hanlan <keithh@nortel.ca> writes:
  66.  
  67.      To add directories using Unix shell metacharacters use
  68.      `expand-file-name' like this:
  69.  
  70.           (push (expand-file-name "~keithh/.emacsdir") load-path)
  71.  
  72. 
  73. File: xemacs-faq.info,  Node: Q3.0.5,  Next: Q3.0.6,  Prev: Q3.0.4,  Up: Customization
  74.  
  75. How to check if a lisp function is defined?
  76. ===========================================
  77.  
  78.    Use the following elisp:
  79.  
  80.      (fboundp 'foo)
  81.  
  82.    It's almost always a mistake to test `emacs-version' or any similar
  83. variables.
  84.  
  85.    Instead, use feature-tests, such as `featurep', `boundp', `fboundp',
  86. or even simple behavioural tests, eg.:
  87.  
  88.      (defvar foo-old-losing-code-p
  89.        (condition-case nil (progn (losing-code t) nil)
  90.         (wrong-number-of-arguments t)))
  91.  
  92.    There is an incredible amount of broken code out there which could
  93. work much better more often in more places if it did the above instead
  94. of trying to divine its environment from the value of one variable.
  95.  
  96. 
  97. File: xemacs-faq.info,  Node: Q3.0.6,  Next: Q3.0.7,  Prev: Q3.0.5,  Up: Customization
  98.  
  99. Can I force the output of `(face-list)' to a buffer?
  100. ====================================================
  101.  
  102.    It would be good having it in a buffer, as the output of
  103. `(face-list)' is too wide to fit to a minibuffer.
  104.  
  105.    Evaluate the expression in the `*scratch*' buffer with point after
  106. the rightmost paren and typing `C-j'.
  107.  
  108.    If the minibuffer smallness is the only problem you encounter, you
  109. can simply press `C-h l' to get the former minibuffer contents in a
  110. buffer.
  111.  
  112. 
  113. File: xemacs-faq.info,  Node: Q3.0.7,  Next: Q3.0.8,  Prev: Q3.0.6,  Up: Customization
  114.  
  115. Font selections in don't get saved after `Save Options'.
  116. ========================================================
  117.  
  118.    For XEmacs 19.14 and previous:
  119.  
  120.    John Mann <mannj@ll.mit.edu> writes:
  121.  
  122.      You have to go to Options->Menubar Appearance and unselect
  123.      `Frame-Local Font Menu'.  If this option is selected, font changes
  124.      are only applied to the *current* frame and do *not* get saved
  125.      when you save options.
  126.  
  127.    For XEmacs 19.15 and later:
  128.  
  129.    Implement the above as well as set the following in your `.emacs'
  130.  
  131.      (setq options-save-faces t)
  132.  
  133. 
  134. File: xemacs-faq.info,  Node: Q3.0.8,  Next: Q3.0.9,  Prev: Q3.0.7,  Up: Customization
  135.  
  136. How do I get a single minibuffer frame?
  137. =======================================
  138.  
  139.    Vin Shelton <acs@acm.org> writes:
  140.  
  141.      (setq initial-frame-plist '(minibuffer nil))
  142.      (setq default-frame-plist '(minibuffer nil))
  143.      (setq default-minibuffer-frame
  144.            (make-frame
  145.          '(minibuffer only
  146.                           width 86
  147.                           height 1
  148.                           menubar-visible-p nil
  149.                           default-toolbar-visible-p nil
  150.                           name "minibuffer"
  151.                           top -2
  152.                           left -2
  153.                           has-modeline-p nil)))
  154.      (frame-notice-user-settings)
  155.  
  156.    *NOTE:* The single minibuffer frame may not be to everyone's taste,
  157. and there any number of other XEmacs options settings that may make it
  158. difficult or inconvenient to use.
  159.  
  160. 
  161. File: xemacs-faq.info,  Node: Q3.0.9,  Next: Q3.1.1,  Prev: Q3.0.8,  Up: Customization
  162.  
  163. `Customize'.
  164. ============
  165.  
  166.    Strating with XEmacs 20.2 there is new system 'Customize' for
  167. customizing XEmacs options.
  168.  
  169.    You can access `Customize' from the `Options' menu or invoking one
  170. of customize commands byt typing eg.  `M-x customize', `M-x
  171. customize-face', `M-x customize-variable' or `M-x customize-apropos'.
  172.  
  173.    Strating with XEmacs 20.3 there is also new `browser' mode for
  174. Customize.  Try it out with `M-x customize-browse'
  175.  
  176. 
  177. File: xemacs-faq.info,  Node: Q3.1.1,  Next: Q3.1.2,  Prev: Q3.0.9,  Up: Customization
  178.  
  179. Where is a list of X resources?
  180. ===============================
  181.  
  182.    Search through the `NEWS' file for `X Resources'.  A fairly
  183. comprehensive list is given after it.
  184.  
  185.    In addition, an `app-defaults' file is supplied, `etc/Emacs.ad'
  186. listing the defaults.  The file `etc/sample.Xdefaults' gives a set of
  187. defaults that you might consider.  It is essentially the same as
  188. `etc/Emacs.ad' but some entries are slightly altered.  Be careful about
  189. installing the contents of this file into your `.Xdefaults' or
  190. `.Xresources' file if you use GNU Emacs under X11 as well.
  191.  
  192. 
  193. File: xemacs-faq.info,  Node: Q3.1.2,  Next: Q3.1.3,  Prev: Q3.1.1,  Up: Customization
  194.  
  195. How can I detect a color display?
  196. =================================
  197.  
  198.    You can test the return value of the function `(device-class)', as
  199. in:
  200.  
  201.      (when (eq (device-class) 'color)
  202.        (set-face-foreground  'font-lock-comment-face "Grey")
  203.        (set-face-foreground  'font-lock-string-face  "Red")
  204.        ....
  205.        )
  206.  
  207. 
  208. File: xemacs-faq.info,  Node: Q3.1.3,  Next: Q3.1.4,  Prev: Q3.1.2,  Up: Customization
  209.  
  210. `(set-screen-width)' worked in 19.6, but not in 19.13?
  211. ======================================================
  212.  
  213.    In Lucid Emacs 19.6 I did `(set-screen-width CHARACTERS)' and
  214. `(set-screen-height LINES)' in my `.emacs' instead of specifying
  215. `Emacs*EmacsScreen.geometry' in my `.Xdefaults' but this does not work
  216. in XEmacs 19.13.
  217.  
  218.    These two functions now take frame arguments:
  219.  
  220.      (set-frame-width (selected-frame) CHARACTERS)
  221.      (set-frame-height (selected-frame) LINES)
  222.  
  223. 
  224. File: xemacs-faq.info,  Node: Q3.1.4,  Next: Q3.1.5,  Prev: Q3.1.3,  Up: Customization
  225.  
  226. Specifiying `Emacs*EmacsScreen.geometry' in `.emacs' does not work in 19.15?
  227. ============================================================================
  228.  
  229.    In XEmacs 19.11 I specified `Emacs*EmacsScreen.geometry' in my
  230. `.emacs' but this does not work in XEmacs 19.15.
  231.  
  232.    We have switched from using the term "screen" to using the term
  233. "frame".
  234.  
  235.    The correct entry for your `.Xdefaults' is now:
  236.  
  237.      Emacs*EmacsFrame.geometry
  238.  
  239. 
  240. File: xemacs-faq.info,  Node: Q3.1.5,  Next: Q3.1.6,  Prev: Q3.1.4,  Up: Customization
  241.  
  242. How can I get the icon to just say `XEmacs'?
  243. ============================================
  244.  
  245.    I'd like the icon to just say `XEmacs', and not include the name of
  246. the current file in it.
  247.  
  248.    Add the following line to your `.emacs':
  249.  
  250.      (setq frame-icon-title-format "XEmacs")
  251.  
  252. 
  253. File: xemacs-faq.info,  Node: Q3.1.6,  Next: Q3.1.7,  Prev: Q3.1.5,  Up: Customization
  254.  
  255. How can I have the window title area display the full path?
  256. ===========================================================
  257.  
  258.    I'd like to have the window title area display the full
  259. directory/name of the current buffer file and not just the name.
  260.  
  261.    Add the following line to your `.emacs':
  262.  
  263.      (setq frame-title-format "%S: %f")
  264.  
  265.    A more sophisticated title might be:
  266.  
  267.      (setq frame-title-format
  268.        '("%S: " (buffer-file-name "%f" (dired-directory dired-directory "%b"))))
  269.  
  270.    That is, use the file name, or the dired-directory, or the buffer
  271. name.
  272.  
  273. 
  274. File: xemacs-faq.info,  Node: Q3.1.7,  Next: Q3.1.8,  Prev: Q3.1.6,  Up: Customization
  275.  
  276. `xemacs -name junk' doesn't work?
  277. =================================
  278.  
  279.    When I run `xterm -name junk', I get an xterm whose class name
  280. according to xprop, is `junk'.  This is the way it's supposed to work,
  281. I think.  When I run `xemacs -name junk' the class name is not set to
  282. `junk'.  It's still `emacs'.  What does `xemacs -name' really do?  The
  283. reason I ask is that my window manager (fvwm) will make a window sticky
  284. and I use XEmacs to read my mail.  I want that XEmacs window to be
  285. sticky, without having to use the window manager's function to set the
  286. window sticky.  What gives?
  287.  
  288.    `xemacs -name' sets the application name for the program (that is,
  289. the thing which normally comes from `argv[0]').  Using `-name' is the
  290. same as making a copy of the executable with that new name.  The
  291. `WM_CLASS' property on each frame is set to the frame-name, and the
  292. application-class.  So, if you did `xemacs -name FOO' and then created
  293. a frame named BAR, you'd get an X window with WM_CLASS = `( "BAR",
  294. "Emacs")'.  However, the resource hierarchy for this widget would be:
  295.  
  296.      Name:    FOO   .shell             .container   .BAR
  297.      Class:   Emacs .TopLevelEmacsShell.EmacsManager.EmacsFrame
  298.  
  299.    instead of the default
  300.  
  301.      Name:    xemacs.shell             .container   .emacs
  302.      Class:   Emacs .TopLevelEmacsShell.EmacsManager.EmacsFrame
  303.  
  304.    It is arguable that the first element of WM_CLASS should be set to
  305. the application-name instead of the frame-name, but I think that's less
  306. flexible, since it does not give you the ability to have multiple frames
  307. with different WM_CLASS properties.  Another possibility would be for
  308. the default frame name to come from the application name instead of
  309. simply being `emacs'.  However, at this point, making that change would
  310. be troublesome: it would mean that many users would have to make yet
  311. another change to their resource files (since the default frame name
  312. would suddenly change from `emacs' to `xemacs', or whatever the
  313. executable happened to be named), so we'd rather avoid it.
  314.  
  315.    To make a frame with a particular name use:
  316.  
  317.      (make-frame '((name . "the-name")))
  318.  
  319. 
  320. File: xemacs-faq.info,  Node: Q3.1.8,  Next: Q3.2.1,  Prev: Q3.1.7,  Up: Customization
  321.  
  322. `-iconic' doesn't work.
  323. =======================
  324.  
  325.    When I start up XEmacs using `-iconic' it doesn't work right.  Using
  326. `-unmapped' on the command line, and setting the `initiallyUnmapped' X
  327. Resource don't seem to help much either...
  328.  
  329.    Ben Wing <ben@666.com> writes:
  330.  
  331.      Ugh, this stuff is such an incredible mess that I've about given up
  332.      getting it to work.  The principal problem is numerous
  333.      window-manager bugs...
  334.  
  335. 
  336. File: xemacs-faq.info,  Node: Q3.2.1,  Next: Q3.2.2,  Prev: Q3.1.8,  Up: Customization
  337.  
  338. How can I set color options from `.emacs'?
  339. ==========================================
  340.  
  341.    How can I set the most commonly used color options from my `.emacs'
  342. instead of from my `.Xdefaults'?
  343.  
  344.    Like this:
  345.  
  346.      (set-face-background 'default      "bisque")     ; frame background
  347.      (set-face-foreground 'default      "black")      ; normal text
  348.      (set-face-background 'zmacs-region "red")        ; When selecting w/
  349.                                                       ; mouse
  350.      (set-face-foreground 'zmacs-region "yellow")
  351.      (set-face-font       'default      "*courier-bold-r*120-100-100*")
  352.      (set-face-background 'highlight    "blue")       ; Ie when selecting buffers
  353.      (set-face-foreground 'highlight    "yellow")
  354.      (set-face-background 'modeline     "blue")       ; Line at bottom of buffer
  355.      (set-face-foreground 'modeline     "white")
  356.      (set-face-font       'modeline     "*bold-r-normal*140-100-100*")
  357.      (set-face-background 'isearch      "yellow")     ; When highlighting while
  358.                                                       ; searching
  359.      (set-face-foreground 'isearch      "red")
  360.      (setq x-pointer-foreground-color   "black")      ; Adds to bg color,
  361.                                                       ; so keep black
  362.      (setq x-pointer-background-color   "blue")       ; This is color you really
  363.                                                       ; want ptr/crsr
  364.  
  365. 
  366. File: xemacs-faq.info,  Node: Q3.2.2,  Next: Q3.2.3,  Prev: Q3.2.1,  Up: Customization
  367.  
  368. How do I set the text, menu and modeline fonts?
  369. ===============================================
  370.  
  371.    Note that you should use `Emacs.' and not `Emacs*' when setting face
  372. values.
  373.  
  374.    In `.Xdefaults':
  375.  
  376.      Emacs.default.attributeFont:  -*-*-medium-r-*-*-*-120-*-*-m-*-*-*
  377.      Emacs*menubar*font:           fixed
  378.      Emacs.modeline.attributeFont: fixed
  379.  
  380.    This is confusing because modeline is a face, and can be found listed
  381. with all faces in the current mode by using `M-x set-face-font (enter)
  382. ?'.  It uses the face specification of `attributeFont', while menubar
  383. is a normal X thing that uses the specification `font'.  With Motif it
  384. may be necessary to use `fontList' instead of `font'.
  385.  
  386. 
  387. File: xemacs-faq.info,  Node: Q3.2.3,  Next: Q3.2.4,  Prev: Q3.2.2,  Up: Customization
  388.  
  389. How can I set the colors when highlighting a region?
  390. ====================================================
  391.  
  392.    How can I set the background/foreground colors when highlighting a
  393. region?
  394.  
  395.    You can change the face `zmacs-region' either in your `.Xdefaults':
  396.  
  397.      Emacs.zmacs-region.attributeForeground: firebrick
  398.      Emacs.zmacs-region.attributeBackground: lightseagreen
  399.  
  400.    or in your `.emacs':
  401.  
  402.      (set-face-background 'zmacs-region "red")
  403.      (set-face-foreground 'zmacs-region "yellow")
  404.  
  405. 
  406. File: xemacs-faq.info,  Node: Q3.2.4,  Next: Q3.2.5,  Prev: Q3.2.3,  Up: Customization
  407.  
  408. How can I limit color map usage?
  409. ================================
  410.  
  411.    I'm using Netscape (or another color grabber like XEmacs); is there
  412. anyway to limit the number of available colors in the color map?
  413.  
  414.    XEmacs 19.13 didn't have such a mechanism (unlike netscape, or other
  415. color-hogs).  One solution is to start XEmacs prior to netscape, since
  416. this will prevent Netscape from grabbing all colors (but Netscape will
  417. complain).  You can use the flags for Netscape, like -mono, -ncols <#>
  418. or -install (for mono, limiting to <#> colors, or for using a private
  419. color map).  Since Netscape will take the entire colormap and never
  420. release it, the only reasonable way to run it is with `-install'.
  421.  
  422.    If you have the money, another solution would be to use a truecolor
  423. or direct color video.
  424.  
  425.    Starting with XEmacs 19.14, XEmacs uses the closest available color
  426. if the colormap is full, so it's O.K. now to start Netscape first.
  427.  
  428. 
  429. File: xemacs-faq.info,  Node: Q3.2.5,  Next: Q3.3.1,  Prev: Q3.2.4,  Up: Customization
  430.  
  431. My tty supports color, but XEmacs doesn't use them.
  432. ===================================================
  433.  
  434.    XEmacs tries to automatically determine whether your tty supports
  435. color, but sometimes guesses wrong.  In that case, you can make XEmacs
  436. Do The Right Thing using this Lisp code:
  437.  
  438.      (if (eq 'tty (device-type))
  439.          (set-device-class nil 'color))
  440.  
  441. 
  442. File: xemacs-faq.info,  Node: Q3.3.1,  Next: Q3.3.2,  Prev: Q3.2.5,  Up: Customization
  443.  
  444. How can I make the modeline go away?
  445. ====================================
  446.  
  447.      (set-specifier has-modeline-p nil)
  448.  
  449.    Starting with XEmacs 19.14 the modeline responds to mouse clicks, so
  450. if you haven't liked or used the modeline in the past, you might want to
  451. try the new version out.
  452.  
  453. 
  454. File: xemacs-faq.info,  Node: Q3.3.2,  Next: Q3.3.3,  Prev: Q3.3.1,  Up: Customization
  455.  
  456. How do you have XEmacs display the line number in the modeline?
  457. ===============================================================
  458.  
  459.    Add the following line to your `.emacs' file to display the line
  460. number:
  461.  
  462.      (line-number-mode 1)
  463.  
  464.    Use the following to display the column number:
  465.  
  466.      (column-number-mode 1)
  467.  
  468.    Or select from the `Options' menu
  469. `Customize->Emacs->Editing->Basics->Line Number Mode' and/or
  470. `Customize->Emacs->Editing->Basics->Column Number Mode'
  471.  
  472.    Or type `M-x customize RET editing-basics RET'.
  473.  
  474. 
  475. File: xemacs-faq.info,  Node: Q3.3.3,  Next: Q3.3.4,  Prev: Q3.3.2,  Up: Customization
  476.  
  477. How do I get XEmacs to put the time of day on the modeline?
  478. ===========================================================
  479.  
  480.    Add the following line to your `.emacs' file to display the time:
  481.  
  482.      (display-time)
  483.  
  484.    See `Customize' from the `Options' menu for customization.
  485.  
  486. 
  487. File: xemacs-faq.info,  Node: Q3.3.4,  Next: Q3.3.5,  Prev: Q3.3.3,  Up: Customization
  488.  
  489. How do I turn off current chapter from AUC TeX modeline?
  490. ========================================================
  491.  
  492.    With AUC TeX, fast typing is hard because the current chapter,
  493. section etc. are given in the modeline.  How can I turn this off?
  494.  
  495.    It's not AUC TeX, it comes from `func-menu' in `func-menu.el'.  Add
  496. this code to your `.emacs' to turn it off:
  497.  
  498.      (setq fume-display-in-modeline-p nil)
  499.  
  500.    Or just add a hook to `TeX-mode-hook' to turn it off only for TeX
  501. mode:
  502.  
  503.      (add-hook 'TeX-mode-hook '(lambda () (setq fume-display-in-modeline-p nil)))
  504.  
  505.    David Hughes <dhughes@origin-at.co.uk> writes:
  506.  
  507.      If you have 19.14 or later, try this instead; you'll still get the
  508.      function name displayed in the modeline, but it won't attempt to
  509.      keep track when you modify the file. To refresh when it gets out
  510.      of synch, you simply need click on the `Rescan Buffer' option in
  511.      the function-menu.
  512.  
  513.           (setq-default fume-auto-rescan-buffer-p nil)
  514.  
  515. 
  516. File: xemacs-faq.info,  Node: Q3.3.5,  Next: Q3.4.1,  Prev: Q3.3.4,  Up: Customization
  517.  
  518. How can one change the modeline color based on the mode used?
  519. =============================================================
  520.  
  521.    You can use something like the following:
  522.  
  523.      (add-hook 'lisp-mode-hook
  524.                (lambda ()
  525.                  (set-face-background 'modeline "red" (current-buffer))))
  526.  
  527.    Then, when editing a Lisp file (i.e. when in Lisp mode), the modeline
  528. colors change from the default set in your `.emacs'.  The change will
  529. only be made in the buffer you just entered (which contains the Lisp
  530. file you are editing) and will not affect the modeline colors anywhere
  531. else.
  532.  
  533.    Notes:
  534.  
  535.    * The hook is the mode name plus `-hook'.  eg. c-mode-hook,
  536.      c++-mode-hook, emacs-lisp-mode-hook (used for your `.emacs' or a
  537.      `xx.el' file), lisp-interaction-mode-hook (the `*scratch*'
  538.      buffer), text-mode-hook, etc.
  539.  
  540.    * Be sure to use `add-hook', not `(setq c-mode-hook xxxx)',
  541.      otherwise you will erase anything that anybody has already put on
  542.      the hook.
  543.  
  544.    * You can also do `(set-face-font 'modeline FONT)', eg.
  545.      `(set-face-font 'modeline "*bold-r-normal*140-100-100*"
  546.      (current-buffer))' if you wish the modeline font to vary based on
  547.      the current mode.
  548.  
  549.    This works in 19.15 as well, but there are additional modeline faces,
  550. `modeline-buffer-id', `modeline-mousable', and
  551. `modeline-mousable-minor-mode', which you may want to customize.
  552.  
  553. 
  554. File: xemacs-faq.info,  Node: Q3.4.1,  Next: Q3.4.2,  Prev: Q3.3.5,  Up: Customization
  555.  
  556. How do I open a frame on another screen of my multi-headed display?
  557. ===================================================================
  558.  
  559.    The support for this was revamped for 19.14.  Use the command `M-x
  560. make-frame-on-display'.  This command is also on the File menu in the
  561. menubar.
  562.  
  563.    XEmacs 19.14 and later also have the command `make-frame-on-tty'
  564. which will establish a connection to any tty-like device.  Opening the
  565. TTY devices should be left to `gnuclient', though.
  566.  
  567. 
  568. File: xemacs-faq.info,  Node: Q3.4.2,  Next: Q3.5.1,  Prev: Q3.4.1,  Up: Customization
  569.  
  570. Can I really connect to a running XEmacs after calling up over a modem?  How?
  571. =============================================================================
  572.  
  573.    If you're not running at least XEmacs 19.14, you can't.  Otherwise
  574. check out the `gnuattach' program supplied with XEmacs.  Starting with
  575. XEmacs 20.3, `gnuattach' and `gnudoit' functionality will be provided
  576. by `gnuclient'.
  577.  
  578. 
  579. File: xemacs-faq.info,  Node: Q3.5.1,  Next: Q3.5.2,  Prev: Q3.4.2,  Up: Customization
  580.  
  581. How can I bind complex functions (or macros) to keys?
  582. =====================================================
  583.  
  584.    As an example, say you want the `paste' key on a Sun keyboard to
  585. insert the current Primary X selection at point. You can accomplish this
  586. with:
  587.  
  588.      (define-key global-map [f18] 'x-insert-selection)
  589.  
  590.    However, this only works if there is a current X selection (the
  591. selection will be highlighted).  The functionality I like is for the
  592. `paste' key to insert the current X selection if there is one,
  593. otherwise insert the contents of the clipboard.  To do this you need to
  594. pass arguments to `x-insert-selection'.  This is done by wrapping the
  595. call in a 'lambda form:
  596.  
  597.      (global-set-key [f18]
  598.                      (lambda () (interactive) (x-insert-selection t nil)))
  599.  
  600.    This binds the f18 key to a "generic" functional object.  The
  601. interactive spec is required because only interactive functions can be
  602. bound to keys.
  603.  
  604.    For the FAQ example you could use:
  605.  
  606.      (global-set-key [(control ?.)]
  607.              (lambda () (interactive) (scroll-up 1)))
  608.      (global-set-key [(control ?;)]
  609.                  (lambda () (interactive) (scroll-up -1)))
  610.  
  611.    This is fine if you only need a few functions within the lambda body.
  612. If you're doing more it's cleaner to define a separate function as in
  613. question 3.5.3 (*Note Q3.5.3::).
  614.  
  615. 
  616. File: xemacs-faq.info,  Node: Q3.5.2,  Next: Q3.5.3,  Prev: Q3.5.1,  Up: Customization
  617.  
  618. How can I stop down-arrow from adding empty lines to the bottom of my buffers?
  619. ==============================================================================
  620.  
  621.    Add the following line to your `.emacs' file:
  622.  
  623.      (setq next-line-add-newlines nil)
  624.  
  625.    This has been the default setting in XEmacs for some time.
  626.  
  627. 
  628. File: xemacs-faq.info,  Node: Q3.5.3,  Next: Q3.5.4,  Prev: Q3.5.2,  Up: Customization
  629.  
  630. How do I bind C-. and C-; to scroll one line up and down?
  631. =========================================================
  632.  
  633.    Add the following (Thanks to Richard Mlynarik <mly@adoc.xerox.com>
  634. and Wayne Newberry <wayne@zen.cac.stratus.com>) to `.emacs':
  635.  
  636.      (defun scroll-up-one-line ()
  637.        (interactive)
  638.        (scroll-up 1))
  639.      
  640.      (defun scroll-down-one-line ()
  641.        (interactive)
  642.        (scroll-down 1))
  643.      
  644.      (global-set-key [(control ?.)] 'scroll-up-one-line)        ; C-.
  645.      (global-set-key [(control ?;)] 'scroll-down-one-line)      ; C-;
  646.  
  647.    The key point is that you can only bind simple functions to keys; you
  648. can not bind a key to a function that you're also passing arguments to.
  649. (*Note Q3.5.1:: for a better answer).
  650.  
  651. 
  652. File: xemacs-faq.info,  Node: Q3.5.4,  Next: Q3.5.5,  Prev: Q3.5.3,  Up: Customization
  653.  
  654. Globally binding `Delete'?
  655. ==========================
  656.  
  657.    I cannot manage to globally bind my `Delete' key to something other
  658. than the default.  How does one do this?
  659.  
  660.      (defun foo ()
  661.        (interactive)
  662.        (message "You hit DELETE"))
  663.      
  664.      (global-set-key 'delete 'foo)
  665.  
  666.    However, some modes explicitly bind `Delete', so you would need to
  667. add a hook that does `local-set-key' for them. If what you want to do
  668. is make the Backspace and Delete keys work more PC/Motif-like, then
  669. take a look at the `delbs.el' package.
  670.  
  671.    New in XEmacs 19.14 is a variable called `key-translation-map' which
  672. makes it easier to bind `Delete'. `delbs.el' is a good example of how
  673. to do this correctly.
  674.  
  675.    Also *Note Q3.5.10::.
  676.  
  677. 
  678. File: xemacs-faq.info,  Node: Q3.5.5,  Next: Q3.5.6,  Prev: Q3.5.4,  Up: Customization
  679.  
  680. Scrolling one line at a time.
  681. =============================
  682.  
  683.    Can the cursor keys scroll the screen a line at a time, rather than
  684. the default half page jump?  I tend it to find it disorienting.
  685.  
  686.    Try this:
  687.  
  688.      (defun scroll-one-line-up (&optional arg)
  689.        "Scroll the selected window up (forward in the text) one line (or N lines)."
  690.        (interactive "p")
  691.        (scroll-up (or arg 1)))
  692.      
  693.      (defun scroll-one-line-down (&optional arg)
  694.        "Scroll the selected window down (backward in the text) one line (or N)."
  695.        (interactive "p")
  696.        (scroll-down (or arg 1)))
  697.      
  698.      (global-set-key [up]   'scroll-one-line-up)
  699.      (global-set-key [down] 'scroll-one-line-down)
  700.  
  701.    The following will also work but will affect more than just the
  702. cursor keys (i.e. `C-n' and `C-p'):
  703.  
  704.      (setq scroll-step 1)
  705.  
  706.    You can change this also with Customize.  Select from the `Options'
  707. menu `Customize->Emacs->Environment->Windows->Scroll Step...'  or type
  708. `M-x customize RET windows RET'.
  709.  
  710. 
  711. File: xemacs-faq.info,  Node: Q3.5.6,  Next: Q3.5.7,  Prev: Q3.5.5,  Up: Customization
  712.  
  713. How to map `Help' key alone on Sun type4 keyboard?
  714. ==================================================
  715.  
  716.    The following works in GNU Emacs 19:
  717.  
  718.      (global-set-key [help] 'help-command)          ;; Help
  719.  
  720.    The following works in XEmacs 19.15 with the addition of shift:
  721.  
  722.      (global-set-key [(shift help)] 'help-command)          ;; Help
  723.  
  724.    But it doesn't work alone.  This is in the file `PROBLEMS' which
  725. should have come with your XEmacs installation: *Emacs ignores the
  726. `help' key when running OLWM*.
  727.  
  728.    OLWM grabs the `help' key, and retransmits it to the appropriate
  729. client using `XSendEvent'.  Allowing Emacs to react to synthetic events
  730. is a security hole, so this is turned off by default.  You can enable
  731. it by setting the variable `x-allow-sendevents' to t.  You can also
  732. cause fix this by telling OLWM to not grab the help key, with the null
  733. binding `OpenWindows.KeyboardCommand.Help:'.
  734.  
  735. 
  736. File: xemacs-faq.info,  Node: Q3.5.7,  Next: Q3.5.8,  Prev: Q3.5.6,  Up: Customization
  737.  
  738. How can you type in special characters in XEmacs?
  739. =================================================
  740.  
  741.    One way is to use the package `x-compose'.  Then you can use
  742. sequences like `Compose " a' to get Σ, etc.
  743.  
  744.    Another way is to use the iso-ascii package, provided in XEmacs 19.15
  745. and later.
  746.  
  747. 
  748. File: xemacs-faq.info,  Node: Q3.5.8,  Next: Q3.5.9,  Prev: Q3.5.7,  Up: Customization
  749.  
  750. Why does `(global-set-key [delete-forward] 'delete-char)' complain?
  751. ===================================================================
  752.  
  753.    Why does `(define-key global-map [ delete-forward ] 'delete-char)'
  754. complain of not being able to bind an unknown key?
  755.  
  756.    Try this instead:
  757.  
  758.      (define-key global-map [delete_forward] 'delete-char)
  759.  
  760.    and it will work.
  761.  
  762.    What you are seeing above is a bug due to code that is trying to
  763. check for GNU Emacs syntax like:
  764.  
  765.    (define-key global-map [C-M-a] 'delete-char)
  766.  
  767.    which otherwise would cause no errors but would not result in the
  768. expected behavior.
  769.  
  770.    This bug has been fixed in 19.14.
  771.  
  772. 
  773. File: xemacs-faq.info,  Node: Q3.5.9,  Next: Q3.5.10,  Prev: Q3.5.8,  Up: Customization
  774.  
  775. How do I make the Delete key delete forward?
  776. ============================================
  777.  
  778.    Use the `delbs' package:
  779.  
  780.      (require 'delbs)
  781.  
  782.    This will give you the functions `delbs-enable-delete-forward' to
  783. set things up, and `delbs-disable-delete-forward' to revert to "normal"
  784. behavior.
  785.  
  786.    You can change this also with Customize.  Select from the `Options'
  787. menu `Customize->Emacs->Editing->Basics->Delete Key Deletes Forward' or
  788. type `M-x customize RET editing-basics RET'.
  789.  
  790.    Also *Note Q3.5.4::.
  791.  
  792. 
  793. File: xemacs-faq.info,  Node: Q3.5.10,  Next: Q3.6.1,  Prev: Q3.5.9,  Up: Customization
  794.  
  795. Can I turn on "sticky" modifier keys?
  796. =====================================
  797.  
  798.    Yes, with `(setq modifier-keys-are-sticky t)'.  This will give the
  799. effect of being able to press and release Shift and have the next
  800. character typed come out in upper case.  This will affect all the other
  801. modifier keys like Control and Meta as well.
  802.  
  803.    Ben Wing <ben@666.com> writes:
  804.  
  805.      One thing about the sticky modifiers is that if you move the mouse
  806.      out of the frame and back in, it cancels all currently "stuck"
  807.      modifiers.
  808.  
  809. 
  810. File: xemacs-faq.info,  Node: Q3.6.1,  Next: Q3.6.2,  Prev: Q3.5.10,  Up: Customization
  811.  
  812. Is there a way to make the bar cursor thicker?
  813. ==============================================
  814.  
  815.    I'd like to have the bar cursor a little thicker, as I tend to
  816. "lose" it often.
  817.  
  818.    For a 1 pixel bar cursor, use:
  819.  
  820.      (setq bar-cursor t)
  821.  
  822.    For a 2 pixel bar cursor, use:
  823.  
  824.      (setq bar-cursor 'anything-else)
  825.  
  826.    You can also change these with Customize.  Select from the `Options'
  827. menu `Customize->Emacs->Environment->Display->Bar Cursor...'  or type
  828. `M-x customize RET display RET'.
  829.  
  830.    You can use a color to make it stand out better:
  831.  
  832.      Emacs*cursorColor:    Red
  833.  
  834. 
  835. File: xemacs-faq.info,  Node: Q3.6.2,  Next: Q3.6.3,  Prev: Q3.6.1,  Up: Customization
  836.  
  837. Is there a way to get back the block cursor?
  838. ============================================
  839.  
  840.      (setq bar-cursor nil)
  841.  
  842.    You can also change this with Customize.  Select from the `Options'
  843. menu `Customize->Emacs->Environment->Display->Bar Cursor...'  or type
  844. `M-x customize RET display RET'.
  845.  
  846. 
  847. File: xemacs-faq.info,  Node: Q3.6.3,  Next: Q3.7.1,  Prev: Q3.6.2,  Up: Customization
  848.  
  849. Can I make the cursor blink?
  850. ============================
  851.  
  852.    If you are running a version of XEmacs older than 19.14, no.
  853. Otherwise you can do the following:
  854.  
  855.      (blink-cursor-mode)
  856.  
  857.    This function toggles between a steady cursor and a blinking cursor.
  858. You may also set this mode from the menu bar by selecting `Options =>
  859. Frame Appearance => Blinking Cursor'.
  860.  
  861. 
  862. File: xemacs-faq.info,  Node: Q3.7.1,  Next: Q3.7.2,  Prev: Q3.6.3,  Up: Customization
  863.  
  864. How can I turn off Mouse pasting?
  865. =================================
  866.  
  867.    I keep hitting the middle mouse button by accident and getting stuff
  868. pasted into my buffer so how can I turn this off?
  869.  
  870.    Here is an alternative binding, whereby the middle mouse button
  871. selects (but does not cut) the expression under the mouse. Clicking
  872. middle on a left or right paren will select to the matching one.  Note
  873. that you can use `define-key' or `global-set-key'.
  874.  
  875.      (defun mouse-set-point-and-select (event)
  876.        "Sets the point at the mouse location, then marks following form"
  877.        (interactive "@e")
  878.        (mouse-set-point event)
  879.        (mark-sexp 1))
  880.      (define-key global-map [button2] 'mouse-set-point-and-select)
  881.  
  882. 
  883. File: xemacs-faq.info,  Node: Q3.7.2,  Next: Q3.7.3,  Prev: Q3.7.1,  Up: Customization
  884.  
  885. How do I set control/meta/etc modifiers on mouse buttons?
  886. =========================================================
  887.  
  888.    Use, for instance, `[(meta button1)]'. For example, here is a common
  889. setting for Common Lisp programmers who use the bundled ilisp package,
  890. whereby meta-button1 on a function name will find the file where the
  891. function name was defined, and put you at that location in the source
  892. file.
  893.  
  894.    [Inside a function that gets called by the lisp-mode-hook and
  895. ilisp-mode-hook]
  896.  
  897.      (local-set-key [(meta button1)] 'edit-definitions-lisp)
  898.  
  899. 
  900. File: xemacs-faq.info,  Node: Q3.7.3,  Next: Q3.7.4,  Prev: Q3.7.2,  Up: Customization
  901.  
  902. Clicking the left button does not do anything in buffer list.
  903. =============================================================
  904.  
  905.    I do `C-x C-b' to get a list of buffers and the entries get
  906. highlighted when I move the mouse over them but clicking the left mouse
  907. does not do anything.
  908.  
  909.    Use the middle mouse button.
  910.  
  911. 
  912. File: xemacs-faq.info,  Node: Q3.7.4,  Next: Q3.7.5,  Prev: Q3.7.3,  Up: Customization
  913.  
  914. How can I get a list of buffers when I hit mouse button 3?
  915. ==========================================================
  916.  
  917.    The following code will replace the default popup on button3:
  918.  
  919.      (global-set-key [button3] 'popup-buffer-menu)
  920.  
  921. 
  922. File: xemacs-faq.info,  Node: Q3.7.5,  Next: Q3.7.6,  Prev: Q3.7.4,  Up: Customization
  923.  
  924. Why does cut-and-paste not work between XEmacs and a cmdtool?
  925. =============================================================
  926.  
  927.    We don't know.  It's a bug.  There does seem to be a work-around,
  928. however.  Try running xclipboard first.  It appears to fix the problem
  929. even if you exit it.  (This should be mostly fixed in 19.13, but we
  930. haven't yet verified that).
  931.  
  932. 
  933. File: xemacs-faq.info,  Node: Q3.7.6,  Next: Q3.7.7,  Prev: Q3.7.5,  Up: Customization
  934.  
  935. How I can set XEmacs up so that it pastes where the text cursor is?
  936. ===================================================================
  937.  
  938.    By default XEmacs pastes X selections where the mouse pointer is.
  939. How do I disable this?
  940.  
  941.    Examine the function `mouse-yank', by typing `C-h f mouse-yank RET'.
  942.  
  943.    To get XEmacs to paste at the text cursor, add this your `.emacs':
  944.  
  945.      (setq mouse-yank-at-point t)
  946.  
  947. 
  948. File: xemacs-faq.info,  Node: Q3.7.7,  Next: Q3.7.8,  Prev: Q3.7.6,  Up: Customization
  949.  
  950. How do I select a rectangular region?
  951. =====================================
  952.  
  953.    Just select the region normally, then use the rectangle commands
  954. (e.g.  `kill-rectangle' on it.  The region does not highlight as a
  955. rectangle, but the commands work just fine.
  956.  
  957.    To actually sweep out rectangular regions with the mouse do the
  958. following:
  959.  
  960.      (setq mouse-track-rectangle-p t)
  961.  
  962.    Aki Vehtari <Aki.Vehtari@hut.fi> writes:
  963.  
  964.      To actually sweep out rectangular regions with the mouse you can
  965.      also use `mouse-track-do-rectangle' which is assigned to
  966.      `M-button1'. Then use rectangle commands.
  967.  
  968.            mouse-track-do-rectangle: (event)
  969.              -- an interactive compiled Lisp function.
  970.            Like `mouse-track' but selects rectangles instead of regions.
  971.  
  972. 
  973. File: xemacs-faq.info,  Node: Q3.7.8,  Next: Q3.8.1,  Prev: Q3.7.7,  Up: Customization
  974.  
  975. Why does `M-w' take so long?
  976. ============================
  977.  
  978.    It actually doesn't.  It leaves the region visible for a second so
  979. that you can see what area is being yanked.  If you start working,
  980. though, it will immediately complete its operation.  In other words, it
  981. will only delay for a second if you let it.
  982.  
  983. 
  984. File: xemacs-faq.info,  Node: Q3.8.1,  Next: Q3.8.2,  Prev: Q3.7.8,  Up: Customization
  985.  
  986. How do I get rid of the menu (or menubar)?
  987. ==========================================
  988.  
  989.    If you are running XEmacs 19.13 and earlier, add this command to your
  990. `.emacs'.
  991.  
  992.      (set-menubar nil)
  993.  
  994.    Starting with XEmacs 19.14 the preferred method is:
  995.  
  996.      (set-specifier menubar-visible-p nil)
  997.  
  998. 
  999. File: xemacs-faq.info,  Node: Q3.8.2,  Next: Q3.8.3,  Prev: Q3.8.1,  Up: Customization
  1000.  
  1001. Can I customize the basic menubar?
  1002. ==================================
  1003.  
  1004.    For an extensive menubar, add this line to your `.emacs':
  1005.  
  1006.      (load "big-menubar")
  1007.  
  1008.    If you'd like to write your own, this file provides as good a set of
  1009. examples as any to start from.  The file is located in
  1010. `lisp/packages/big-menubar.el' in the XEmacs installation directory.
  1011.  
  1012. 
  1013. File: xemacs-faq.info,  Node: Q3.8.3,  Next: Q3.8.4,  Prev: Q3.8.2,  Up: Customization
  1014.  
  1015. How do I control how many buffers are listed in the menu `Buffers List'?
  1016. ========================================================================
  1017.  
  1018.    Add the following to your `.emacs' (suit to fit):
  1019.  
  1020.      (setq buffers-menu-max-size 20)
  1021.  
  1022.    For no limit, use an argument of `nil'.
  1023.  
  1024. 
  1025. File: xemacs-faq.info,  Node: Q3.8.4,  Next: Q3.8.5,  Prev: Q3.8.3,  Up: Customization
  1026.  
  1027. Resources like `Emacs*menubar*font' are not working?
  1028. ====================================================
  1029.  
  1030.    I am trying to use a resource like `Emacs*menubar*font' to set the
  1031. font of the menubar but it's not working.
  1032.  
  1033.    If you are using the real Motif menubar, this resource is not
  1034. recognized; you have to say:
  1035.  
  1036.      Emacs*menubar*fontList: FONT
  1037.  
  1038.    If you are using the Lucid menubar, the former resource will be
  1039. recognized only if the latter resource is unset.  This means that the
  1040. resource
  1041.  
  1042.      *fontList: FONT
  1043.  
  1044.    will override
  1045.  
  1046.      Emacs*menubar*font: FONT
  1047.  
  1048.    even though the latter is more specific.
  1049.  
  1050. 
  1051. File: xemacs-faq.info,  Node: Q3.8.5,  Next: Q3.9.1,  Prev: Q3.8.4,  Up: Customization
  1052.  
  1053. How can I bind a key to a function to toggle the toolbar?
  1054. =========================================================
  1055.  
  1056.    Try something like:
  1057.  
  1058.      (defun my-toggle-toolbar ()
  1059.        (interactive)
  1060.        (set-specifier default-toolbar-visible-p
  1061.                       (not (specifier-instance default-toolbar-visible-p))))
  1062.      (global-set-key "\C-xT" 'my-toggle-toolbar)
  1063.  
  1064.    There are redisplay bugs in 19.14 that may make the preceding result
  1065. in a messed-up display, especially for frames with multiple windows.
  1066. You may need to resize the frame before XEmacs completely realizes the
  1067. toolbar is really gone.
  1068.  
  1069.    Thanks to Martin Buchholz <Martin.Buchholz@sun.com> for the correct
  1070. code.
  1071.  
  1072. 
  1073. File: xemacs-faq.info,  Node: Q3.9.1,  Next: Q3.9.2,  Prev: Q3.8.5,  Up: Customization
  1074.  
  1075. How can I disable the scrollbar?
  1076. ================================
  1077.  
  1078.    To disable them for all frames, add the following line to your
  1079. `.Xdefaults':
  1080.  
  1081.      Emacs.scrollBarWidth:  0
  1082.  
  1083.    To turn the scrollbar off on a per-frame basis, use the following
  1084. function:
  1085.  
  1086.      (set-specifier scrollbar-width 0 (selected-frame))
  1087.  
  1088.    You can actually turn the scrollbars on at any level you want by
  1089. substituting for (selected-frame) in the above command.  For example, to
  1090. turn the scrollbars off only in a single buffer:
  1091.  
  1092.      (set-specifier scrollbar-width 0 (current-buffer))
  1093.  
  1094.    In XEmacs versions prior to 19.14, you had to use the hairier
  1095. construct:
  1096.  
  1097.      (set-specifier scrollbar-width (cons (selected-frame) 0))
  1098.  
  1099. 
  1100. File: xemacs-faq.info,  Node: Q3.9.2,  Next: Q3.9.3,  Prev: Q3.9.1,  Up: Customization
  1101.  
  1102. How can one use resources to change scrollbar colors?
  1103. =====================================================
  1104.  
  1105.    Here's a recap of how to use resources to change your scrollbar
  1106. colors:
  1107.  
  1108.      ! Motif scrollbars
  1109.      
  1110.      Emacs*XmScrollBar.Background: skyblue
  1111.      Emacs*XmScrollBar.troughColor: lightgray
  1112.      
  1113.      ! Athena scrollbars
  1114.      
  1115.      Emacs*Scrollbar.Foreground: skyblue
  1116.      Emacs*Scrollbar.Background: lightgray
  1117.  
  1118.    Note the capitalization of `Scrollbar' for the Athena widget.
  1119.  
  1120. 
  1121. File: xemacs-faq.info,  Node: Q3.9.3,  Next: Q3.9.4,  Prev: Q3.9.2,  Up: Customization
  1122.  
  1123. Moving the scrollbar can move the point; can I disable this?
  1124. ============================================================
  1125.  
  1126.    When I move the scrollbar in an XEmacs window, it moves the point as
  1127. well, which should not be the default behavior.  Is this a bug or a
  1128. feature?  Can I disable it?
  1129.  
  1130.    The current behavior is a feature, not a bug.  Point remains at the
  1131. same buffer position as long as that position does not scroll off the
  1132. screen.  In that event, point will end up in either the upper-left or
  1133. lower-left hand corner.
  1134.  
  1135.    This cannot be changed.
  1136.  
  1137. 
  1138. File: xemacs-faq.info,  Node: Q3.9.4,  Next: Q3.10.1,  Prev: Q3.9.3,  Up: Customization
  1139.  
  1140. How can I get automatic horizontal scrolling?
  1141. =============================================
  1142.  
  1143.    By the same token, how can I turn it off in specific modes?
  1144.  
  1145.    To do this, add to your `.emacs' file:
  1146.  
  1147.      (require 'auto-show)
  1148.  
  1149.    Then do `(setq truncate-lines t)' in the mode-hooks for any modes in
  1150. which you want lines truncated.
  1151.  
  1152.    More precisely: If `truncate-lines' is nil, horizontal scrollbars
  1153. will never appear.  Otherwise, they will appear only if the value of
  1154. `scrollbar-height' for that buffer/window/etc. is non-zero.  If you do
  1155.  
  1156.      (set-specifier scrollbar-height 0)
  1157.  
  1158.    then horizontal scrollbars will not appear in truncated buffers
  1159. unless the package specifically asked for them.
  1160.  
  1161.    Automatic horizontal scrolling is now standard, starting with 19.14.
  1162.  
  1163. 
  1164. File: xemacs-faq.info,  Node: Q3.10.1,  Next: Q3.10.2,  Prev: Q3.9.4,  Up: Customization
  1165.  
  1166. How can I turn off or change highlighted selections?
  1167. ====================================================
  1168.  
  1169.    The `zmacs' mode allows for what some might call gratuitous
  1170. highlighting for selected regions (either by setting mark or by using
  1171. the mouse).  This is the default behavior.  To turn off, add the
  1172. following line to your `.emacs' file:
  1173.  
  1174.      (setq zmacs-regions nil)
  1175.  
  1176.    You can also change these with Customize.  Select from the `Options'
  1177. menu `Customize->Emacs->->Editing->Basics->Zmacs Regions' or type `M-x
  1178. customize RET editing-basics RET'.
  1179.  
  1180.    To change the face for selection, look at `Options->Customize' on
  1181. the menubar.
  1182.  
  1183. 
  1184. File: xemacs-faq.info,  Node: Q3.10.2,  Next: Q3.10.3,  Prev: Q3.10.1,  Up: Customization
  1185.  
  1186. How do I get that typing on an active region removes it?
  1187. ========================================================
  1188.  
  1189.    I want to change things so that if I select some text and start
  1190. typing, the typed text replaces the selected text, similar to Motif.
  1191.  
  1192.    You want to use something called "pending delete".  Pending delete
  1193. is what happens when you select a region (with the mouse or keyboard)
  1194. and you press a key to replace the selected region by the key you typed.
  1195. Usually backspace kills the selected region.
  1196.  
  1197.    To get this behavior, add the following line to your `.emacs':
  1198.  
  1199.      (turn-on-pending-delete)
  1200.  
  1201.    Note that this will work with both Backspace and Delete.
  1202.  
  1203. 
  1204. File: xemacs-faq.info,  Node: Q3.10.3,  Next: Q3.10.4,  Prev: Q3.10.2,  Up: Customization
  1205.  
  1206. Can I turn off the highlight during isearch?
  1207. ============================================
  1208.  
  1209.    I do not like my text highlighted while I am doing isearch as I am
  1210. not able to see what's underneath.  How do I turn it off?
  1211.  
  1212.    Put the following in your `.emacs':
  1213.  
  1214.      (setq isearch-highlight nil)
  1215.  
  1216.    You can also change these with Customize.  Type `M-x
  1217. customize-variable RET isearch-highlight RET'.
  1218.  
  1219.    Note also that isearch-highlight affects query-replace and ispell.
  1220. Instead of disabling isearch-highlight you may find that a better
  1221. solution consists of customizing the `isearch' face.
  1222.  
  1223. 
  1224. File: xemacs-faq.info,  Node: Q3.10.4,  Next: Q3.10.5,  Prev: Q3.10.3,  Up: Customization
  1225.  
  1226. How do I turn off highlighting after `C-x C-p' (mark-page)?
  1227. ===========================================================
  1228.  
  1229.    Put this in your `.emacs':
  1230.  
  1231.      (setq zmacs-regions nil)
  1232.  
  1233.    *Warning: This command turns off all region highlighting.*
  1234.  
  1235.    Also *Note Q3.10.1::.
  1236.  
  1237. 
  1238. File: xemacs-faq.info,  Node: Q3.10.5,  Prev: Q3.10.4,  Up: Customization
  1239.  
  1240. The region disappears when I hit the end of buffer while scrolling.
  1241. ===================================================================
  1242.  
  1243.    How do I turn this feature (if it indeed is a feature) off?
  1244.  
  1245.    Like this:
  1246.  
  1247.      (defadvice scroll-up (around scroll-up freeze)
  1248.        (interactive "_P")
  1249.        (let ((zmacs-region-stays t))
  1250.          (if (interactive-p)
  1251.          (condition-case nil
  1252.              ad-do-it
  1253.            (end-of-buffer (goto-char (point-max))))
  1254.            ad-do-it)))
  1255.      
  1256.      (defadvice scroll-down (around scroll-down freeze)
  1257.        (interactive "_P")
  1258.        (let ((zmacs-region-stays t))
  1259.          (if (interactive-p)
  1260.          (condition-case nil
  1261.              ad-do-it
  1262.            (beginning-of-buffer (goto-char (point-min))))
  1263.            ad-do-it)))
  1264.  
  1265.    Thanks to T. V. Raman <raman@adobe.com> for assistance in deriving
  1266. this answer.
  1267.  
  1268. 
  1269. File: xemacs-faq.info,  Node: Subsystems,  Next: Miscellaneous,  Prev: Customization,  Up: Top
  1270.  
  1271. Major Subsystems
  1272. ****************
  1273.  
  1274.    This is part 4 of the XEmacs Frequently Asked Questions list.  This
  1275. section is devoted to major XEmacs subsystems.
  1276.  
  1277. * Menu:
  1278.  
  1279. Reading Mail with VM:
  1280. * Q4.0.1::      How do I set up VM to retrieve remote mail using POP?
  1281. * Q4.0.2::      How do I get VM to filter mail for me?
  1282. * Q4.0.3::      How can I get VM to automatically check for new mail?
  1283. * Q4.0.4::      [This question intentionally left blank]
  1284. * Q4.0.5::      How do I get my outgoing mail archived?
  1285. * Q4.0.6::      I have various addresses at which I receive mail.  How can I tell VM to ignore them when doing a "reply-all"?
  1286. * Q4.0.7::      Is there a mailing list or FAQ for VM?
  1287. * Q4.0.8::      Remote Mailreading with VM.
  1288. * Q4.0.9::      rmail or VM gets an error incorporating new mail.
  1289. * Q4.0.10::     How do I make VM stay in a single frame?
  1290. * Q4.0.11::     How do I make VM or mh-e display graphical smilies?
  1291. * Q4.0.12::     Customization of VM not covered in the manual or here.
  1292.  
  1293. Web browsing with W3:
  1294. * Q4.1.1::      What is W3?
  1295. * Q4.1.2::      How do I run W3 from behind a firewall?
  1296. * Q4.1.3::      Is it true that W3 supports style sheets and tables?
  1297.  
  1298. Reading Netnews and Mail with Gnus:
  1299. * Q4.2.1::      GNUS, (ding) Gnus, Gnus 5, September Gnus, Red Gnus,argh!
  1300. * Q4.2.2::      [This question intentionally left blank]
  1301. * Q4.2.3::      How do I make Gnus stay within a single frame?
  1302. * Q4.2.4::      How do I customize the From: line?
  1303.  
  1304. Other Mail & News:
  1305. * Q4.3.1::      How can I read and/or compose MIME messages?
  1306. * Q4.3.2::      What is TM and where do I get it?
  1307. * Q4.3.3::      Why isn't this `movemail' program working?
  1308. * Q4.3.4::      Movemail is also distributed by Netscape?  Can that cause problems?
  1309. * Q4.3.5::      Where do I find pstogif (required by tm)?
  1310.  
  1311. Sparcworks, EOS, and WorkShop:
  1312. * Q4.4.1::      What is SPARCworks, EOS, and WorkShop
  1313.  
  1314. Energize:
  1315. * Q4.5.1::      What is/was Energize?
  1316.  
  1317. Infodock:
  1318. * Q4.6.1::      What is Infodock?
  1319.  
  1320. Other Unbundled Packages:
  1321. * Q4.7.1::      What is AUC TeX?  Where do you get it?
  1322. * Q4.7.2::      Are there any Emacs Lisp Spreadsheets?
  1323. * Q4.7.3::      Byte compiling AUC TeX on XEmacs 19.14
  1324. * Q4.7.4::      Problems installing AUC TeX
  1325. * Q4.7.5::      Is there a reason for an Emacs package not to be included in XEmacs?
  1326.  
  1327. 
  1328. File: xemacs-faq.info,  Node: Q4.0.1,  Next: Q4.0.2,  Prev: Subsystems,  Up: Subsystems
  1329.  
  1330. How do I set up VM to retrieve mail from a remote site using POP?
  1331. =================================================================
  1332.  
  1333.    Use `vm-spool-files', like this for example:
  1334.  
  1335.      (setq vm-spool-files '("/var/spool/mail/wing"
  1336.                             "netcom23.netcom.com:110:pass:wing:MYPASS"))
  1337.  
  1338.    Of course substitute your actual password for MYPASS.
  1339.  
  1340. 
  1341. File: xemacs-faq.info,  Node: Q4.0.2,  Next: Q4.0.3,  Prev: Q4.0.1,  Up: Subsystems
  1342.  
  1343. How do I get VM to filter mail for me?
  1344. ======================================
  1345.  
  1346.    One possibility is to use procmail to split your mail before it gets
  1347. to VM.  I prefer this personally, since there are many strange and
  1348. wonderful things one can do with procmail.  Procmail may be found at
  1349. <URL:ftp://ftp.informatik.rwth-aachen.de/pub/packages/procmail/>.
  1350.  
  1351.    Also see the Mail Filtering FAQ at:
  1352. <URL:http://www.cis.ohio-state.edu/hypertext/faq/usenet/mail/filtering-faq/faq.html>.
  1353.  
  1354. 
  1355. File: xemacs-faq.info,  Node: Q4.0.3,  Next: Q4.0.4,  Prev: Q4.0.2,  Up: Subsystems
  1356.  
  1357. How can I get VM to automatically check for new mail?
  1358. =====================================================
  1359.  
  1360.    John Turner <turner@lanl.gov> writes:
  1361.  
  1362.      Use the following:
  1363.  
  1364.           (setq vm-auto-get-new-mail 60)
  1365.  
  1366. 
  1367. File: xemacs-faq.info,  Node: Q4.0.4,  Next: Q4.0.5,  Prev: Q4.0.3,  Up: Subsystems
  1368.  
  1369. [This question intentionally left blank]
  1370. ========================================
  1371.  
  1372.    Obsolete question, left blank to avoid renumbering.
  1373.  
  1374. 
  1375. File: xemacs-faq.info,  Node: Q4.0.5,  Next: Q4.0.6,  Prev: Q4.0.4,  Up: Subsystems
  1376.  
  1377. How do I get my outgoing mail archived?
  1378. =======================================
  1379.  
  1380.      (setq mail-archive-file-name "~/outbox")
  1381.  
  1382. 
  1383. File: xemacs-faq.info,  Node: Q4.0.6,  Next: Q4.0.7,  Prev: Q4.0.5,  Up: Subsystems
  1384.  
  1385. I have various addresses at which I receive mail.  How can I tell VM to ignore them when doing a "reply-all"?
  1386. =============================================================================================================
  1387.  
  1388.    Set `vm-reply-ignored-addresses' to a list, like
  1389.  
  1390.      (setq vm-reply-ignored-addresses '("wing@netcom[0-9]*.netcom.com"
  1391.                         "wing@netcom.com" "wing@666.com"))
  1392.  
  1393.    Note that each string is a regular expression.
  1394.  
  1395. 
  1396. File: xemacs-faq.info,  Node: Q4.0.7,  Next: Q4.0.8,  Prev: Q4.0.6,  Up: Subsystems
  1397.  
  1398. Is there a mailing list or FAQ for VM?
  1399. ======================================
  1400.  
  1401.    A FAQ for VM exists at
  1402. <URL:http://www.cyberpass.net/~gorkab/vmfaq.htm>.
  1403.  
  1404.    VM has its own newsgroups gnu.emacs.vm.info and gnu.emacs.vm.bug.
  1405.  
  1406.